<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<!-- 2014年到2050年哪年一月一日是星期日-->
<body>
  <script>
    var date = new Date('2014');
    var year = date.getFullYear();
    var month = date.getMonth();
    var week = ['周日','周一','周二','周三','周四','周五','周六'];
    for(var i = 2014; i <= 2050; i++){
      var day = new Date(year,month,1)
      if(day.getDay() == 0){
        console.log(year);
      }
      ++year
    }
  </script>
</body>
</html>